<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>填写定制信息</title>
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="../css/page.css">
    <script src="../js/jquery-3.2.1.min.js"></script>
    <script src="../js/media.js"></script>
    <script src="../js/common.js"></script>



    <style>

    </style>
</head>

<body>
    <!--头部-->
    <div class="public-header flex">
        <!--<span class="public-header-left-search"></span>-->
        <span class="public-header-left-back"></span>
        <span class="public-header-center">填写定制信息</span>
        <span class="public-header-right"></span>
    </div>

    <!--正文-->
    <div class="Fill-in-custom-information bc-gray">
        <p class="title">定制信息：</p>
        <textarea name="" id="t1" cols="30" rows="10">内容内容内容内容</textarea>
        <p class="title">定制信息：</p>
        <textarea name="" id="t2" cols="30" rows="10">内容内容内容内容</textarea>
        <p class="title">定制信息：</p>
        <textarea name="" id="t3" cols="30" rows="10">内容内容内容内容</textarea>
        <div id="pay_img">
            <p class="title">点击识别二维码付款：</p>
            <img src="../img/二维码@3x 2.png" alt="">
        </div>
        <p class="title t1" id="pay_price">
            定制价格:
            <font>123</font>元
        </p>
        <span class="button">
          下一步
      </span>

    </div>


    <script>
        $(function () {

            $('#pay_img').css('display', 'none');
            $('.button').on('click', function () {
                if ($('#pay_img').css('display') == 'none') {
                    $('#pay_img').css('display', 'block');
                    $('#pay_price').hide();

                } else {

             
                    let info = '';
                    let s_id = getQueryString('s_id')
                    info += $('#t1').html() + ',';
                    info += $('#t2').html() + ',';
                    info += $('#t3').html();
                    $.ajax({
                        url: base_url + 'ZITAOHUI/order/order',
                        data: {
                            info: info,
                            price: $('#pay_price font').html(),
                            uid: 1,
                            storeid: s_id,
                        },
                        success: function (data) {
                            console.log(data)
                            if (data.code == 1) {
                                window.location.href = '../page/my-address.html?order_id=' +
                                    data.extend.data
                            }
                        }
                    })
                }


            })



        })
    </script>
</body>

</html>